var _mm=require('common/util/mm.js');



var _address={
	
	
getAddressList:function(resolve, reject) {
		_mm.request({
			url    :_mm.getServerUrl('/shipping/list.do'),
			data   :{
				pageSize:10,
			},
			method :'POST',
			success:resolve,
			error  :reject,

		})
	},
	//新建地址	
save:function(addressInfo,resolve, reject) {
		_mm.request({
			url    :_mm.getServerUrl('/shipping/add.do'),
			data   :addressInfo,
			method :'POST',
			success:resolve,
			error  :reject,

		})
	},
	//删除地址	
deleteAddress:function(shippingId,resolve, reject) {
		_mm.request({
			url    :_mm.getServerUrl('/shipping/del.do'),
			data   :shippingId,
			method :'POST',
			success:resolve,
			error  :reject,

		})
	},
	//修改地址
update:function(addressInfo,resolve, reject) {
		_mm.request({
			url    :_mm.getServerUrl('/shipping/update.do'),
			data   :addressInfo,
			method :'POST',
			success:resolve,
			error  :reject,

		})
	},
		//获取修改收件人信息	
selectAddress:function(shippingId,resolve, reject) {
		_mm.request({
			url    :_mm.getServerUrl('/shipping/select.do'),
			data   :{
				shippingId:shippingId
			},
			method :'POST',
			success:resolve,
			error  :reject,

		})
	},
	


	
}
module.exports =_address;